﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Awesome Header</title>
    <link rel="stylesheet" href="style.css" />
    <script type="text/javascript" src="jquery.min.js">

    </script>

</head>
<body>
<script type="text/javascript">

    var Header = {
        // Let's write in JSON to make it more modular
        addFade: function(selector) {
            $("<span class=\"fake-hover\"></span>").css("display",
        "none").prependTo($(selector));
            // Safari dislikes hide() for some reason
            $(selector + " a").bind("mouseenter", function() {
                $(selector + " .fake-hover").fadeIn("slow");
            });
            $(selector + " a").bind("mouseleave", function() {
                $(selector + " .fake-hover").fadeOut("slow");
            });
        }
    };
    $(function() {
        Header.addFade("#header");
    });
    
    

</script>
<h1 id="header">
<span class="fake-hover"></span>
<a href="#">Awesome header</a>
</h1>
</body>
</html>
